//
//  USTodayMemoryDayCell.m
//  us
//
//  Created by karry on 2025/6/23.
//

#import "USTodayMemoryDayCell.h"

@implementation USTodayMemoryDayCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setDayModel:(USMemorialDayModel *)dayModel {
    _dayModel = dayModel;
    
    self.titleLab.text = dayModel.anniversaryName;
    
    if (dayModel.coverUrl.length == 0) {
        self.imgView.image = [UIImage systemImageNamed:@"circle.fill"];
    }else{
        self.imgView.image = [UIImage imageNamed:dayModel.coverUrl];
    }
  
  
    self.imgView.tintColor = [UIColor jk_colorWithHexString:dayModel.color];
 

    if (dayModel.dayCount == 0 && dayModel.repeatYearly == YES) {
        self.desLab.text = @"今天";
    }else{
        self.desLab.text = [NSString stringWithFormat:@"还有%li天",labs(dayModel.dayCount)];
    }
}

@end
